package com.jiuqi.muchmore.clothing.utils;

import java.util.UUID;

public class GUIDUtil {

	public static UUID toUUID(GUID guid) {
		if (guid != null) {
			return new UUID(guid.getMostSigBits(), guid.getLeastSigBits());
		} else {
			return new UUID(0,0);
		}
	}
	
	public static GUID toGUID(UUID uuid) {
		if (uuid != null) {
			return GUID.valueOf(uuid.getMostSignificantBits(), uuid.getLeastSignificantBits());
		} else {
			return GUID.emptyID;
		}
	}
	
	public static void main(String[] args) {
		System.out.println(toUUID(GUID.tryValueOf("EC9AE1412F713518B84BE69E88605F5F")));
	}
}
